import java.util.Random;
import java.util.Scanner;

public class GuessNumber {
    public static void main(String[] args) {
        Random ran=new Random();
        Scanner sca=new Scanner(System.in);
        int num= ran.nextInt(100);
        System.out.println(num);
        while(true){
            System.out.println("请输入你要猜的数字：");
            int a= sca.nextInt();
            if(a>num){
                System.out.println("猜大了");
            } else if (a<num) {
                System.out.println("猜小了");
            }else {
                System.out.println("恭喜你，猜对了");
                break;
            }
        }
    }
}
